<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/layouts/template.xhtml">
	<ui:define name="body">
		<h:form id="form" acceptcharset="ISO-8859-1">
			<f:metadata>
				<f:viewParam name="param" value="#{unitMeasureBean.param}"/>
			</f:metadata>

			<p:panel header="#{msgs['massai.unitMeasure.header.register']}">
				<h:panelGrid cellspacing="3" cellpadding="0">
					<h:panelGrid>
						<p:outputLabel value="#{msgs['massai.unitMeasure.acronym']}" for="acronym" />
						<p:inputText id="acronym" tabindex="1" value="#{unitMeasureBean.unitMeasure.acronym}" 
							style="width: 80px;" maxlength="10" required="true" requiredMessage="Sigla #{msgs['common.required.field']}" />
					</h:panelGrid>

					<h:panelGrid>
						<p:outputLabel value="#{msgs['massai.unitMeasure.name']}" for="name" />
						<p:inputText id="name" tabindex="2" value="#{unitMeasureBean.unitMeasure.nameMeasure}" 
							style="width: 250px;" maxlength="100" required="true" requiredMessage="Nome #{msgs['common.required.field']}" />
					</h:panelGrid>
				</h:panelGrid>
				
				<p:spacer height="25px" />

				<h:panelGrid style="width: 100%;">
					<h:panelGrid style="float: right;" columns="2">
						<p:commandButton value="#{msgs['common.back']}" style="padding: 1px !important;"
							action="unitMeasureConsult" ajax="false" immediate="true" tabindex="5" />

						<p:commandButton tabindex="6" value="#{msgs['common.save']}"
							actionListener="#{unitMeasureBean.save()}" ajax="false" 
							style="margin-right: 5px;" styleClass="buttonSave" update=":form"
							rendered="#{sessionBean.showAction('supportUnitMeasure', 'insert')}" />
					</h:panelGrid>
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>